﻿@{
ViewBag.Title = "讲师分配";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section mystyle{
<link href="~/Content/vendor/fullcalendar2/dist/fullcalendar.min.css" rel="stylesheet"/>
}


<div class="container margin-top-20">
  <div class="row">
    <div class="col-sm-12">
      <div id="calendar"></div>
    </div>

    <div class="col-sm-12 margin-top-20">
      <div id="projectInfo"></div>
    </div>

    <div id="table" class="col-sm-12 margin-top-20">
      <table class="table text-center" id="tableList"></table>
    </div>

    <div class="col-sm-12 clearfix">
      <!--<div class="pages"></div>-->
      <p class="float-left">总条数：<span id="totalRow">20</span></p>

      <div class="table-pagination float-right line-height-34 margin-left-10 text-center" id="pages"></div>

      <div class="float-right">
        <form class="form-inline">
          <span>显示条数：</span>
          <select name="pageSize" id="pageSize" class="form-control">
            <option value="10">10</option>
            <option value="20">20</option>
            <option value="30">30</option>
          </select>
        </form>
      </div>


    </div>
  </div>
</div>


<script id="list" type="text/html">
  <thead>
  <tr>
    <th></th>
    <th>主题</th>
    <th>执行时间</th>
    <!--<th>参与讲师</th>-->
    <!--<th>项目阶段</th>-->
    <!--<th>状态</th>-->
    <th class="w250">操作</th>
  </tr>
  </thead>
  <tbody>
  {{each $data}}
  <tr>
    <td>{{$index + 1}}</td>
    <td>{{$value.Name}}</td>
    <td>{{$value.StartTime}} - {{$value.EndTime}}</td>
    <!--<td></td>-->
    <!--<td>{{$value.State}}</td>-->
    <td>
      <button type="button" class="btn btn-success assign">讲师分配</button>
    </td>
  </tr>
  {{/each}}
  </tbody>
</script>


<!-- 讲师分配 -->
<div class="modal fade" id="teacherManger" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div>
        <div class="text-right">
          <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
        </div>
        <form class="form-horizontal" id="tLists">
          <div class="row">
            <div class="col-sm-12"><h3 class="margin-10">讲师管理</h3></div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">项目名称</label>
            <div class="col-sm-8 line-height-34" id="td1">奔驰GLC动态产品培训</div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">主题名称</label>
            <div class="col-sm-8 line-height-34" id="td2">主题1</div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">执行时间</label>
            <div class="col-sm-8 line-height-34" id="td3">2016年5月5日-2016年5月15日</div>
          </div>

          <div v-for="value in table">
            <div class="form-group">
              <label for="" class="col-sm-3 control-label">时间</label>
              <div class="col-sm-8">
                <!--<div class="datepk-box c-select vm w240 pop-style vm">
                  <input type="text" name="td4" id="td4" readonly class="datepk form-control" v-model="value.startTime">
                  <span class="c-select-btn"></span>
                </div>

                <span class="padding-left-10 padding-right-10 vm">至</span>

                <div class="datepk-box c-select vm w240 pop-style vm">
                  <input type="text" name="td5" id="td5" readonly class="datepk form-control" v-model="value.endTime">
                  <span class="c-select-btn"></span>
                </div>-->
                <div class="input-group input-daterange">
                  <input type="text" class="form-control" name="td4" id="td4" v-model="value.startTime" readonly>
                  <span class="input-group-addon">至</span>
                  <input type="text" class="form-control" name="td5" id="td5" v-model="value.endTime" readonly>
                </div>
              </div>
            </div>

            <div class="form-group">
              <label for="" class="col-sm-3 control-label">项目人员</label>
              <div class="col-sm-8">
                <input type="text" class="none" name="td6" id="td6" placeholder="老师" v-model="value.teacher">
                <select class="select" name="" id="" style="width: 100%;" multiple data-index="{{$index}}">
                  <option v-for="option in teacher" v-bind:value="option.UserId">
                    {{ option.UserName }}
                  </option>
                </select>
              </div>
            </div>

            <div class="form-group">
              <label for="" class="col-sm-3 control-label">差旅天数</label>
              <div class="col-sm-8">
                <input type="text" class="form-control" name="td7" id="td7" placeholder="差旅天数" v-model="value.tDays">
              </div>
            </div>

            <div class="form-group">
              <label for="" class="col-sm-3 control-label">执行天数</label>
              <div class="col-sm-8">
                <input type="text" class="form-control" name="td8" id="td8" placeholder="执行天数" v-model="value.eDays">
              </div>
            </div>

            <div class="form-group">
              <div class="col-sm-2 col-sm-offset-3">
                <button type="button" id="btn-add" class="btn btn-success btn-block" v-on:click="add()">添加讲师</button>
              </div>


              <!--<div class="col-sm-2">
                <button type="button" id="btn-save" class="btn btn-danger btn-block">保存</button></div>-->
            </div>
          </div>


          <div>
            <ul>
              <li v-for="value in allData">
                <a class="remove-teacher" v-on:click="del($index)"><span class="glyphicon glyphicon-trash"></span></a>
                <div class="form-group">
                  <label for="" class="col-sm-3 control-label">时间</label>
                  <div class="col-sm-8">
                    <div class="datepk-box c-select vm w240 pop-style vm">
                      <input type="text" class="form-control" readonly v-model="value.startTime">
                    </div>

                    <span class="padding-left-10 padding-right-10 vm">至</span>

                    <div class="datepk-box c-select vm w240 pop-style vm">
                      <input type="text" class="form-control" readonly v-model="value.endTime">
                    </div>
                  </div>
                </div>

                <div class="form-group">
                  <label for="" class="col-sm-3 control-label">老师</label>
                  <div class="col-sm-8">
                    <input type="text" class="form-control" readonly v-model="value.teacher" >
                  </div>
                </div>

                <div class="form-group">
                  <label for="" class="col-sm-3 control-label">差旅天数</label>
                  <div class="col-sm-8">
                    <input type="text" class="form-control" readonly v-model="value.tDays">
                  </div>
                </div>

                <div class="form-group">
                  <label for="" class="col-sm-3 control-label">执行天数</label>
                  <div class="col-sm-8">
                    <input type="text" class="form-control" readonly v-model="value.eDays">
                  </div>
                </div>

              </li>
            </ul>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

@section myscript{
<script src="~/Content/vendor/vue/vue.min.js"></script>
<script src="~/Content/vendor/fullcalendar2/min/moment.min.js"></script>
<script src="~/Content/vendor/fullcalendar2/min/zh-cn.js"></script>
<script src="~/Content/vendor/fullcalendar2/dist/fullcalendar.min.js"></script>
<script src="~/Content/js/bind31.js"></script>
}